package com.huizu.project.service.impl;

import java.util.List;
import com.huizu.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.huizu.project.mapper.ProSpPraiseMapper;
import com.huizu.project.domain.ProSpPraise;
import com.huizu.project.service.IProSpPraiseService;

/**
 * 视频点赞列Service业务层处理
 * 
 * @author zhangmx
 * @date 2024-06-05
 */
@Service
public class ProSpPraiseServiceImpl implements IProSpPraiseService 
{
    @Autowired
    private ProSpPraiseMapper proSpPraiseMapper;

    /**
     * 查询视频点赞列
     * 
     * @param id 视频点赞列主键
     * @return 视频点赞列
     */
    @Override
    public ProSpPraise selectProSpPraiseById(String id)
    {
        return proSpPraiseMapper.selectProSpPraiseById(id);
    }

    /**
     * 查询视频点赞列列表
     * 
     * @param proSpPraise 视频点赞列
     * @return 视频点赞列
     */
    @Override
    public List<ProSpPraise> selectProSpPraiseList(ProSpPraise proSpPraise)
    {
        return proSpPraiseMapper.selectProSpPraiseList(proSpPraise);
    }

    /**
     * 新增视频点赞列
     * 
     * @param proSpPraise 视频点赞列
     * @return 结果
     */
    @Override
    public int insertProSpPraise(ProSpPraise proSpPraise)
    {
        proSpPraise.setCreateTime(DateUtils.getNowDate());
        return proSpPraiseMapper.insertProSpPraise(proSpPraise);
    }

    /**
     * 修改视频点赞列
     * 
     * @param proSpPraise 视频点赞列
     * @return 结果
     */
    @Override
    public int updateProSpPraise(ProSpPraise proSpPraise)
    {
        return proSpPraiseMapper.updateProSpPraise(proSpPraise);
    }

    /**
     * 批量删除视频点赞列
     * 
     * @param ids 需要删除的视频点赞列主键
     * @return 结果
     */
    @Override
    public int deleteProSpPraiseByIds(String[] ids)
    {
        return proSpPraiseMapper.deleteProSpPraiseByIds(ids);
    }

    /**
     * 删除视频点赞列信息
     * 
     * @param id 视频点赞列主键
     * @return 结果
     */
    @Override
    public int deleteProSpPraiseById(String id)
    {
        return proSpPraiseMapper.deleteProSpPraiseById(id);
    }
}
